Ranking and Unranking of t-Ary Trees Using RD-Sequences
نویسندگان
چکیده
In this paper, we introduce a concise representation, called right-distance sequences (or RD-sequences for short), to describe all t-ary trees with n internal nodes. A result reveals that there exists a close relationship between the representation and the well-formed sequences suggested by Zaks [Lexicographic generation of ordered trees, Theoretical Computer Science 10 (1980) 63–82]. Using a coding tree and its concomitant tables, a systematical way can help us to investigate the structural representation of t-ary trees. Consequently, we develop efficient algorithms for determining the rank of a given t-ary tree in lexicographic order (i.e., a ranking algorithm), and for converting a positive integer to its corresponding RD-sequence (i.e., an unranking algorithm). Both the ranking and unranking algorithms can be run in O(tn) time and without computing all the entries of the coefficient table. key words: t-ary trees, ranking, unranking, lexicographic order, coding trees
منابع مشابه
Parallel Generation of t-ary Trees
A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...
متن کاملRanking and Unranking of t-ary Trees Using the Right Distance Representation
In this paper, we introduce a concise representation, called right-distance sequences (or RD-sequences for short), to describe all t-ary trees with n internal nodes. A result reveals that there exists a close relationship between the representation and the well-formated integer sequences suggested by Zaks in 1980. Using recursion tree and its concomitant tables, a systematical way can help us t...
متن کاملParallel Enumeration of t–ary Trees in ASC SIMD Model
In this paper parallel algorithms are presented for enumeration and unranking of t–ary trees with n internal nodes. Generation algorithms are designed in the associative computing model ASC that belongs to a broad category of SIMD models. Tree sequences are generated in lexicographical order, with O(1) time per object, in a new representation, as combinations with repetitions with restricted gr...
متن کاملLexicographic Listing and Ranking of r-ary Trees
This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using...
متن کاملLexicographic Listing and Ranking of t-Ary Trees
This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- IEICE Transactions
دوره 94-D شماره
صفحات -
تاریخ انتشار 2011